libcal.a:add.o sub.o
	ar -rc $@ $^

%.o:%.c
	gcc -c $<

.PHONY:clean
clean:
	rm -rf *.o *.a mylib mylib.tgz

.PHONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp -rf *.h mylib/include
	cp -rf *.a mylib/lib
	tar czf mylib.tgz mylib
